Fail-safe thermal sensor apparatus and method

ABSTRACT

A fail-safe thermal sensor is implemented in an integrated circuit such as a microprocessor. The fail-safe thermal sensor monitors the temperature of the integrated circuit and halt logic halts operation of the integrated circuit in response to the fail-safe thermal sensor indicating that a threshold temperature has been exceeded. The threshold temperature may be a predetermined fixed critical temperature. The halt logic may inhibit operation of the integrated circuit by stopping a clock for the integrated circuit.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a division of prior application Ser. No. 09/093,988filed Jun. 8, 1998 now abandoned which is a continuation of priorapplication Ser. No. 08/660,016, filed Jun. 6, 1996, issued as U.S. Pat.No. 5,838,578 on Nov. 17, 1998, which is a continuation of priorapplication Ser. No. 08/124,980, filed Sep. 21, 1993 abandoned, allentitled “Method and Apparatus for Programmable Thermal Sensor for anIntegrated Circuit” and all assigned to the assignee of the presentapplication.

FIELD OF THE INVENTION

The present invention relates to thermal sensing, and more specificallyto methods and apparatus for a programmable thermal sensor in anintegrated circuit.

ART BACKGROUND

Advances in silicon process technology has lead to the development ofincreasingly larger die sizes for integrated circuits. The large diessizes permit integration of millions of transistors on a single die. Asdie sizes for integrated circuits become larger, the integrated circuitsconsume more power. In addition, advances in microprocessor computingrequire execution of a large number of instructions per second. Toexecute more instructions per second, the microprocessor circuitsoperate at an increased clock frequency. Therefore, a microprocessorcontaining over one million transistors may consume over 30 watts ofpower. With large amounts of power being dissipated, cooling becomes aproblem.

Typically, integrated circuits and printed circuit boards are cooled byeither active or passive cooling devices. A passive cooling device, suchas a heat sink mounted onto an integrated circuit, has a limitedcapacity to dissipate heat. An active cooling device, such as a fan, isused to dissipate larger amounts of heat. Although a fan cooling systemdissipates heat, there are several disadvantages associated with such asystem. Traditionally, fans cool integrated circuits by air convectioncirculated by a fan. However, when a fan is used in conjunction with ahigh density multi-chip computer system, a large volume of air isrequired for cooling thereby necessitating powerful blowers and largeducts. The powerful blowers and large ducts implemented in the computeroccupy precious space and are too noisy. The removal of a cover or othercasing may result in a disturbance of air flow causing the fan coolingsystem to fail. In addition, the fan cooling system is made up ofmechanical parts that have a mean time between failure (MTBF)specification less than a typical integrated circuit. Furthermore, fancooling systems introduce noise and vibration into the system.

In addition to cooling systems, thermal sensors are implemented to trackthe temperature of an integrated circuit or electronic system.Typically, thermal sensors consist of a thermocouple which is directlyattached to a heat sink. In more sophisticated thermal sensing systems,a diode and external analog circuitry are used. In operation, thevoltage/current characteristics of the diode change depending upon thetemperature of the integrated circuit, and the external analog circuitrymeasures the voltage or current characteristics of the diode. Theadditional analog circuitry is complex and difficult to implement. Inaddition, employing the analog circuitry results in a thermal time delaydegrading the accuracy of such a configuration. Moreover, externalanalog circuitry for sensing the voltage of the diode consumes a largerarea than the integrated circuit being sensed. Therefore, it isdesirable to provide a thermal sensor which is incorporated into theintegrated circuit. In addition, it is desirable to provide a thermalsensor that can provide feedback for an active cooling system.Furthermore, it is desirable to control the temperature of an integratedcircuit without the use of a fan. The present invention provides anintegrated thermal sensor that detects a threshold temperature so thatactive cooling of the integrated circuit is accomplished through systemcontrol.

SUMMARY OF THE INVENTION

A programmable thermal sensor is implemented in an integrated circuit.The programmable thermal sensor monitors the temperature of theintegrated circuit, and generates an output to indicate that thetemperature of the integrated circuit has attained a predeterminedthreshold temperature. The programmable thermal sensor contains avoltage reference, a programmable V_(be), a current source, and a senseamplifier or comparator. The current source generates a constant currentto power the voltage reference and the programmable V_(be). With aconstant current source, the voltage reference generates a constantvoltage over varying temperatures and power supply voltages. In apreferred embodiment, the voltage reference is generated with a siliconbandgap reference circuit. The constant voltage from the voltagereference is one input to the sense amplifier. The programmable V_(be)contains a sensing portion and a multiplier portion. In general, theprogrammable V_(be) generates a voltage dependent upon the temperatureof the integrated circuit and the value of programmable inputs. Theprogrammable inputs are supplied to the multiplier portion to generate amultiplier value for use in the multiplier portion. The voltagereference is compared with the voltage generated by the programmableV_(be) in the sense amplifier. The sense amplifier generates a greaterthan, less than, signal.

The programmable thermal sensor of the present invention is implementedin a microprocessor. In addition to the programmable thermal sensor, themicroprocessor contains a processor unit, an internal register,microprogram and clock circuitry. The processor unit incorporates thefunctionality of any microprocessor circuit. The clock circuitrygenerates a system clock for operation of the microprocessor. Ingeneral, the microprogram writes programmable input values to theinternal register. The programmable input values correspond to thresholdtemperatures. The programmable thermal sensor reads the programmableinput values, and generates an interrupt when the temperature of themicroprocessor reaches the threshold temperature. In a first embodiment,the interrupt is input to the microprogram and the processor unit. Inresponse to an interrupt, the processor unit may take steps to cool thetemperature of the microprocessor, and the microprogram programs a newthreshold temperature. For example, the processor may turn on a fan orreduce the clock frequency. The new threshold temperature is slightlyhigher than the current threshold temperature so that the processor unitmay further monitor the temperature of the microprocessor.

In a second embodiment of the present invention, the interrupt generatedby the programmable thermal sensor is input to external sensor logic.The external sensor logic automatically controls the frequency of themicroprocessor. If the temperature of the microprocessor raises, thenthe clock frequency is decreased. Conversely, if the temperature of themicroprocessor drops, then the system clock frequency is increased. Inaddition to a programmable thermal sensor, the microprocessor contains afail safe thermal sensor. The fail safe thermal sensor generates aninterrupt when detecting that the microprocessor reaches predeterminedthreshold temperatures and subsequently halts operation of the systemclock. The predetermined threshold temperature is selected below atemperature that causes physical damage to the device. Themicroprocessor of the present invention is implemented in a computersystem. Upon generation of an interrupt in the programmable thermalsensor, a message containing thermal sensing information is generatedand displayed to a user of the computer system.

BRIEF DESCRIPTION OF THE DRAWINGS

The objects, features, and advantages of the present invention will beapparent from the following detailed description of the preferredembodiment of the invention with references to the following drawings.

FIG. 1 illustrates a block diagram of a programmable thermal sensorconfigured in accordance with the present invention.

FIG. 2 illustrates a graph depicting the relationship between thebase-emitter voltage (V_(be)) of a bipolar transistor versus thetemperature of the supply voltage.

FIG. 3 illustrates a bandgap reference circuit configured in accordancewith the present invention.

FIG. 4 illustrates a programmable base to emitter voltage (V_(be))circuit configured in accordance with the present invention.

FIG. 5 illustrates a current source, including the bandgap referencecircuit, configured in accordance with the present invention.

FIG. 6 illustrates a sense amplifier for the thermal sensor configuredin accordance with the present invention.

FIG. 7 illustrates block diagram of a first embodiment of amicroprocessor incorporating a programmable thermal sensor configured inaccordance with the present invention.

FIG. 8 illustrates a flow diagram for a method of controlling theprogrammable thermal sensor configured in accordance with the presentinvention.

FIG. 9 illustrates a block diagram of a second embodiment of amicroprocessor incorporating a programmable thermal sensor configured inaccordance with the present invention.

FIG. 10 illustrates a block diagram of a microprocessor incorporating afail safe thermal sensor configured in accordance with the presentinvention.

FIG. 11 illustrates a computer system incorporating a microprocessorcomprising thermal sensing configured in accordance with the presentinvention.

NOTION AND NOMENCLATURE

The detailed descriptions which follow are presented, in part, in termsof algorithms and symbolic representations of operations within acomputer system. These algorithmic descriptions and representations arethe means used by those skilled in the data processing arts to mosteffectively convey the substance of their work to others skilled in theart.

An algorithm is here, and generally, conceived to be a self-consistentsequence of steps leading to a desired result. These steps are thoserequiring physical manipulations of physical quantities. Usually, thoughnot necessarily, these quantities take the form of electrical ormagnetic signals capable of being stored, transferred, combined,compared, and otherwise manipulated. It proves convenient at times,principally for reasons of common usage, to refer to these signals asbits, values, elements, symbols, characters, terms, numbers, or thelike. It should be borne in mind, however, that all of these and similarterms are to be associated with the appropriate physical quantities andare merely convenient labels applied to these quantities.

Further, the manipulations performed are often referred to in terms,such as adding or comparing, which are commonly associated with mentaloperations performed by a human operator. No such capability of a humanoperator is necessary, or desirable in most cases, in any of theoperations described herein which form part of the present invention;the operations are machine operations. Useful machines for performingthe operations of the present invention include general purpose digitalcomputers or other similar devices. In all cases there should be bornein mind the distinction between the method operations in operating acomputer and the method of computation itself. The present inventionrelates to method steps for operating a computer in processingelectrical or other (e.g., mechanical, chemical) physical signals togenerate other desired physical signals.

The present invention also relates to apparatus for performing theseoperations. This apparatus may be specially constructed for the requiredpurposes or it may comprise a general purpose computer as selectivelyactivated or reconfigured by a computer program stored in the computer.The algorithms presented herein are not inherently related to aparticular computer or other apparatus. In particular, various generalpurpose machines may be used with programs written in accordance withthe teachings herein, or it may prove more convenient to construct morespecialized apparatus to perform the required method steps. The requiredstructure for a variety of these machines will appear from thedescription given below. Machines which may perform the functions of thepresent invention include those manufactured by Intel Corporation, aswell as other manufacturers of computer systems.

DETAILED DESCRIPTION

Methods and apparatus for thermal sensing in an integrated circuit aredisclosed. In the following description, for purposes of explanation,specific nomenclature is set forth to provide a thorough understandingof the present invention. However, it will be apparent to one skilled inthe art that these specific details are not required to practice thepresent invention. In other instances, well known circuits and devicesare shown in block diagram form to avoid obscuring the present inventionunnecessarily.

Referring to FIG. 1, a block diagram of a programmable thermal sensorconfigured in accordance with the present invention is illustrated. Ingeneral, a programmable thermal sensor 100 monitors the temperature ofan integrated circuit, and generates an output to indicate that thetemperature of the integrated circuit has attained a predeterminedthreshold temperature. The programmable thermal sensor 100 contains avoltage reference 120, a programmable V_(be) 110, a current source 140,and a sense amplifier 160. The current source 140 generates a constantcurrent to power the voltage reference 120 and the programmable V_(be)110. With a constant current source, the voltage reference 120 generatesa constant voltage over varying temperatures and power supply voltages(Vcc). In a preferred embodiment, the voltage reference is generatedwith a silicon bandgap reference circuit. The constant voltage from thevoltage reference 120 is input to the sense amplifier 160. Theprogrammable V_(be) 110 contains a sensing portion and a multiplierportion. In general, the programmable V_(be) 110 generates a voltagedependent upon the temperature of the integrated circuit and the valueof programmable inputs. The programmable inputs are supplied to themultiplier portion to generate a multiplier value for use in themultiplier portion.

Referring to FIG. 2, a graph depicting the relationship between thebase-emitter voltage (V_(be)) of a bipolar transistor versus temperatureis illustrated. A characteristic curve 200 on the graph of FIG. 2 showsthe linear characteristics of the V_(be) voltage over a temperaturerange of 70 degrees Fahrenheit (70° F.) to 140° F. In addition, thegraph of FIG. 2 shows a relative constant bandgap voltage curve 205 overthe specified temperature range. Although the bandgap voltage variesslightly over the temperature range, the variation of the bandgapvoltage is negligible compared to the variation of the V_(be) voltageover the temperature range. As shown by the curve 205 in FIG. 2, thebandgap voltage is equal to approximately 1.3 volts (V). When the V_(be)voltage equals 1.3 volts, the temperature of the integrated circuit is100° F. Based on the linear temperature characteristics of the V_(be)voltage, and the relatively constant bandgap voltage over thetemperature range, a thermal sensor is constructed.

For the voltage/temperature characteristics of line 200 shown in FIG. 2,the bandgap voltage equals the V_(be) voltage when the integratedcircuit is at 100° F. However, the V_(be) voltage may be changed tosense additional temperature values in the integrated circuit. Byshifting the linear V_(be) voltage/temperature characteristic curve 200,any number of predetermined threshold temperature values are detected.To shift the voltage/temperature characteristic curve 200, the V_(be)voltage is multiplied by pre-determined values to generate a new voltagefor comparison to the bandgap voltage. Specifically, to shift thecharacteristic curve 200 to sense a voltage less then 100° F., theV_(be) voltage is multiplied by a fraction to generate a newcharacteristic curve, such as the characteristic curve 210 shown in FIG.2. The characteristic curve 210 exhibits the same slope as the originalcharacteristic curve 200. However, for the characteristic curve 210, theV_(be) voltage is equal to the bandgap voltage when the integratedcircuit temperature equals 90° F. Similarly, the V_(be) voltage may bemultiplied by a value greater than 1 to generate a characteristic curvesuch as the characteristic curve 220 shown in FIG. 2. The characteristiccurve 220 also exhibits the same slope as the original characteristiccurve 200. However, the characteristic curve 220 intersects the bandgapvoltage curve 205 at 120° F. Consequently, any number of thresholdtemperatures are detectable by multiplying the V_(be) voltage by apredetermined constant.

Referring to FIG. 3, a bandgap reference circuit configured inaccordance with the present invention is illustrated. The bandgapreference circuit 120 is powered from a voltage source, Vcc. The voltagesource Vcc is regulated by a current source such that the current source140 supplies a constant current over a wide range of Vcc voltages. Apreferred embodiment of the present invention for the current source 140is described fully below. The bandgap reference circuit 120 containsthree N-P-N bipolar transistors Q1, Q2 and Q3, and three resistiveelements R1, R2 and R3. In general, the constant bandgap referencevoltage, V_(bandgap), is generated at the collector of N-P-N transistorQ3. The bipolar transistors Q1, Q2 and resistive elements R1, R2 and R3are provided to compensate for temperature variations in the base toemitter junction voltage (V_(be)) of bipolar transistor Q3.Specifically, the resistive element R1 is coupled from the currentsource 140 to the collector of bipolar transistor Q1. The collector andbase of bipolar transistor Q1 are shorted so that Q1 is effectively aP-N junction diode. The base of transistor Q1 and the base of transistorQ2 are coupled together. The resistive element R3 couples the collectorof transistor Q2 to the current source 140, and the resistive element R2couples the emitter of transistor Q2 to ground. In a preferredembodiment of the present invention, the resistive element R1 equals4800 ohms, the resistive element R2 equals 560 ohms, and the resistiveelement R3 equals 4800 ohms.

In operation, the voltage at the base of transistors Q1 and Q2 arepulled to the V_(bandgap) voltage through the R1 resistance. Therefore,the transistors Q1 and Q2 are biased in the active region, therebyallowing current to flow from the collector to the emitter oftransistors Q1 and Q2. The mirrored configuration of transistors Q1 andQ2 tends to drive the base to emitter voltage (V_(be)) of transistors Q1and Q2 equivalent. However, the resistive element R2 increases theresistance at the emitter of transistor Q2, resulting in a greatercurrent density flowing through transistor Q1 than flowing throughtransistor Q2. As the temperature in the integrated circuit rises, theV_(be) of transistor Q2 decreases. In turn, the decrease of V_(be) ontransistor Q2 causes a decrease in the current density flow through Q2.The decrease in current density through the resistive element R2 alsocauses a reduction in the current density flowing through the resistiveelement R3. Because the collector of transistor Q2 is coupled to thebase of transistor Q3, a decrease in the current through resistiveelement R3 results in an increase in the voltage at the base oftransistor Q3. Consequently, as the temperature of the integratedcircuit rises, the V_(be) across transistors Q1, Q2, and Q3 decreases.However, the decrease of V_(be) on transistor Q3 is compensated by theincrease of voltage at the base of transistor Q3. Therefore, regardlessof temperature fluctuations, the V_(bandgap) remains at a constantsilicon bandgap voltage. For a further explanation of generation of abandgap reference, including a theoretical derivation, see A. T. Brokaw,A Simple Three-Terminal IC Bandgap Reference, IEEE J. of Solid StateCircuits, December, 1974, and Karel E. Kuijk, A Precision ReferenceVoltage Source, IEEE J. of Solid State Circuits, June 1973.

Referring to FIG. 4, a programmable base to emitter voltage (V_(be))circuit configured in accordance with the present invention isillustrated. In a preferred embodiment of the present invention, atemperature varying voltage is generated from the characteristics of abase to emitter junction on a bipolar transistor. In general, theprogrammable V_(be) circuit generates an output voltage, V_(out), basedon the V_(be) voltage and the value of programmable input voltagesV_(p1), V_(p2) and V_(p3). A N-P-N bipolar transistor Q11 shown in FIG.4 is utilized to generate the V_(be) reference voltage. As describedabove, the V_(be)/temperature characteristic curve may be shifted alongthe temperature axis to detect a desired threshold temperature. Byshifting the V_(be)/temperature characteristic curve along thetemperature axis, a plurality of output voltages representing differentthreshold temperatures are generated.

To generate the V_(out) for a particular threshold temperature, aprogrammable V_(be) multiplier circuit is utilized. The programmableV_(be) multiplier circuit contains resistive elements R5, R6, R7, R8,and R9, and metal oxide semiconductor field effect transistors (MOSFET)Q12, Q13, and Q14. In a preferred embodiment, Q12, Q13 and Q14 compriseN-MOS transistors. The drain terminal of transistor Q12 is coupled to afirst input on resistive element R7, and the source of transistor Q12 iscoupled to a second input on resistive element R7. The transistors Q13and Q14 are similarly coupled to resistive elements R8 and R9,respectively. Programmable input voltages V_(p1), V_(p2), and V_(p3) areinput to the gate of transistors Q12, Q13 and Q14, respectively. Theinput voltages V_(p1), V_(p2), and V_(p3) control the current flow byselecting either a resistive element or the respective MOS transistor.

In operation, the programmable V_(be) multiplier circuit outputs avoltage, V_(out), comprising a multiple of the base to emitter voltageon bipolar transistor Q11. For purposes of explanation, considerresistive elements R6, R7, R8 and R9 as one resistive element: R6-R9.The resistive element R6-R9 is connected across the base to emitterjunction of bipolar transistor Q11. Therefore, the voltage drop acrossthe resistive element R6-R9 is equivalent to V_(be) of bipolartransistor Q11. The current flowing through resistive element R6-R9 isapproximately equal to the current flowing through resistive element R5minus the current flowing into the base of transistor Q11. Therefore, ifthe value of resistive element R5 is equal to the value of resistiveelement R6-R9, the voltage at the collector of transistor Q11 equals2V_(be). In general, the V_(out) voltage is defined by the followingequation:V _(out) =V _(R5) +V _(be)V _(be) =V _(R6-R9)V _(out) =V _(R5) +V _(R6-R9)

Therefore, V_(out) values greater than 1 V_(be) are generated bychanging the ratio between resistive element R5 and resistive elementR6-R9.

To move the V_(be) curve 200 shown in FIG. 2 along the temperature axisvia the programmable V_(be) circuit 110, a combination of resistiveelements R7, R8 and R9 are selected. To select a combination ofresistive elements R7, R8 and R9, the voltages Vp1, Vp2, and Vp3 areapplied to the gates of MOS transistors Q13, Q12, and Q14, respectively.The resistive elements R7, R8 and R9 are binary weighed resistors. Eachindividual resistor R7, R8 and R9 can be shorted through control by Q12,Q13 and Q14 respectively. By selecting resistive elements R7, R8 and R9as series resistors with resistive element R6, the voltage V_(out) ischanged. In a preferred embodiment of the present invention, theresistive element R5 equals 6380, the resistive element R6 equals 5880,the resistive element R7 equals 392, the resistive element R8 equals787, and the resistive element R9 equals 1568. By setting the resistiveelements R5-R9 to the above values and programming the transistors Q13,Q12, and Q14, the voltage V_(out) is generated to correspond to specificthreshold temperatures. Specifically, Table 1 illustrates the thresholdtemperatures programmed in response to the input voltages Vp1, Vp2, andVp3.

TABLE 1 Threshold Temperature Vp1 Vp2 Vp3 (Degrees C.) 0 0 0  70° 0 0 1 80° 0 1 0  90° 0 1 1 100° 1 0 0 110° 1 0 1 120° 1 1 0 130° 1 1 1 140°

Referring to FIG. 5, a current source including the bandgap referencecircuit configured in accordance with the present invention isillustrated. The bandgap reference circuit comprises resistors R1, R2,and R3 and bipolar transistors Q1, Q2, Q3 and Q8. The operation of thebandgap reference circuit 120 is described above. However, the bandgapreference circuit of FIG. 5 also incorporates a gain stage with bipolartransistor Q8. In order to incorporate a gain stage, the collector ofbipolar transistor Q3 is coupled to the base of bipolar transistor Q8.The constant bandgap reference voltage generated at the collector ofbipolar transistor Q3 controls the base of bipolar transistor Q8resulting in a signal at the emitter of bipolar transistor Q8 containinga silicon bandgap voltage with increased current density. In addition tothe bandgap reference circuit, FIG. 5 illustrates a constant currentsource 140 including a start-up circuit portion. The constant currentsource 140 comprises a bipolar transistor Q4, P-MOS transistors Q5, Q7and Q15, and resistor R4. The constant current source 140 stabilizesoperation of the thermal sensor of the present invention over a range ofVcc ranges.

In general, the constant current source 140 is derived from thegeneration of the constant bandgap reference voltage. In operation, theconstant bandgap reference voltage, V_(bandgap), is coupled to the baseof bipolar transistor Q4. The constant bandgap reference voltage drivesthe bipolar transistor Q4 to generate a constant current flowing fromthe collector to the emitter of transistor Q4 and through the resistorR4. The P-MOS transistor Q5 is mirrored with P-MOS transistors Q7 andQ15. The constant current flowing through resistor R4 also flows throughP-MOS transistor Q5 and is mirrored through P-MOS transistors Q7 andQ15. In a preferred embodiment, resistive element R4 equals 6020. TheP-MOS transistor Q15 provides a constant current source for theprogrammable V_(be) circuit 110. Similarly, P-MOS transistor Q7 providesa constant current source to the bandgap reference circuit 120 throughbipolar transistors Q3 and Q8.

The current source and bandgap reference voltage circuit illustrated inFIG. 5 also comprises a start-up circuit. The start-up circuit withinthe current source is required because the bandgap reference voltagecontrols the current source which, in turn, controls the bandgapreference voltage. Therefore, an equilibrium between the bandgapreference voltage and the current source circuit is required to ensurethe proper operation of the thermal sensor. The start-up circuitcontains P-MOS transistors Q6, Q9 and Q10. The P-MOS transistor Q9 isconfigured such that the gate is coupled directly to the drain. In thisconfiguration, the P-MOS transistor Q9 operates as a load resistor. Ingeneral, the start-up circuit generates a voltage for the bandgapreference voltage circuit during initial power-up of the thermal sensor.Specifically, during an initial power-up of the thermal sensor circuit,transistors Q5, Q7, Q10, and Q15 are biased such that no current flowsthrough the respective devices. Also, during the initial power-up state,the P-MOS transistor Q9 is biased to conduct current thereby supplying alow voltage level to the gate of P-MOS transistor Q6. A low voltagelevel at the gate of P-MOS transistor Q6 biases the P-MOS transistor Q6such that current flows from the Vcc to bipolar transistors Q3 and Q8.The P-MOS transistor Q6 biases the base of bipolar transistor Q8allowing generation of the bandgap reference voltage.

An increase in the bandgap reference voltage driving the base of bipolartransistor Q4 causes current to flow from the emitter of Q4 throughresistor R4. As the current density increases through transistors Q5 andQ10, the voltage at the gate of transistor Q6 also increases. The buildup of charge at the gate of transistor Q6 is facilitated by a largeresistance generated by the load transistor Q9. As the voltage at thegate of P-MOS transistor Q6 raises to the pinch-off threshold voltage ofthe device, the P-MOS transistor Q6 conducts no current such thatcurrent is no longer supplied to bipolar transistors Q3 and Q8. Becauseof the gain provided at the emitter of bipolar transistor Q8, currentcontinues to increase in the bandgap reference voltage circuit until thecollector of bipolar transistor Q3 begins to control the base of bipolartransistor Q8. At this point, the circuit has reached an equilibriumsuch that the constant bandgap reference voltage generated supplies aconstant voltage to the current source. Also shown in FIG. 5 is adisable P-MOS transistor Q21. The P-MOS transistor Q21 powers down, ordisables, the thermal sensor circuit for testing. The P-MOS transistorQ21 is utilized only for disabling, and it is not required to generatethe constant current source or the bandgap reference voltage. The P-MOStransistor Q15 isolates the collector of bipolar transistor Q11 on theprogrammable V_(be) circuit from the Vcc on the current source circuit.

Referring to FIG. 6, a sense amplifier for the thermal sensor configuredin accordance with the present invention is illustrated. In a preferredembodiment of the present invention, a sense amplifier 160 containsthree stages. The first stage and the second stage are identical. Thethird stage comprises a current buffer 600. The current buffer 600 isillustrated in FIG. 6 as a standard logic inverter. In general, thesense amplifier 160 operates as a comparator circuit. In operation, ifthe V_(bandgap) is greater than the V_(out) voltage, then the output ofsense amplifier 160 is a low logic level. Alternatively, if the V_(out)is greater than the V_(bandgap) voltage, then the output of senseamplifier 160 is a high logic level. The second stage of sense amplifier160 generates a voltage gain of signals on lines S1 and S1#. The firststage contains PMOS transistors Q16, Q17 and Q18, and NMOS transistorsQ19 and Q20. The transistors Q19 and Q20 are constructed as a currentmirror.

The voltage V_(out) is input to the gate of PMOS transistor Q16, and thevoltage V_(gap) is input to the gate of PMOS transistor Q17. Inoperation, if the voltage V_(out) is greater than the V_(bandgap), thenPMOS transistor Q17 is biased to conduct more current than PMOStransistor Q16. Because a greater current density flows through PMOStransistor Q17 than PMOS transistor Q16, the voltage at line S1 risesand the voltage at line S1# decreases. The source and gate of NMOStransistor Q19 are connected, and the source/gate connection iscontrolled by the voltage at S1#. Consequently, when the voltage at lineS1# decreases, NMOS transistor Q19 is biased to reduce the currentdensity flow. The voltage on line S1# is input to the gate of PMOStransistor Q18. As the voltage on line S1# decreases, the PMOStransistor Q18 is biased to conduct a greater current density. Theincrease in current density through transistor Q18 further amplifies thevoltage difference between lines S1 and S1#. When the V_(be) voltage isless than the V_(gap) voltage, the first stage of the sense amplifier160 operates in an analogous manner.

The second stage of sense amplifier 160 comprises PMOS transistors Q22,Q23 and Q24, and NMOS transistors Q25 and Q26. The operation of thesecond stage of the sense amplifier 160 is analogous to the operation ofthe first stage. In addition, hysteresis is provided for the senseamplifier 160 via a feedback path from the output of sense amplifier 160to the programmable V_(be) circuit V_(out) input of sense amplifier 160.The hysteresis provides a more stable output signal from the senseamplifier 160 such that voltage variations on the inputs of the senseamplifier 160 after generation of a high output voltage level does notcause glitches in the output signal.

For the programmable thermal sensor of the present invention to operatewell over process variations, the resistors are constructed to have awidth larger than the minimum specification for the resistive value. Allbipolar transistors in the programmable thermal sensor contain at leastdouble width emitters. For the MOS transistors, long channel lengths areconstructed. The long channel lengths of the MOS transistors helpstabilize the programmable thermal sensor as well as provide noiseimmunity. For the bandgap reference circuit 120, the bipolar transistorQ2 is constructed to be ten times greater in size than the bipolartransistor Q1. The large size differential between bipolar transistorsQ1 and Q2 provides a stable bandgap voltage reference.

Referring to FIG. 7, a first embodiment of a microprocessorincorporating a programmable thermal sensor configured in accordancewith the present invention is illustrated. A microprocessor 700contains, in part, the programmable thermal sensor 100 and a processorunit 705. The processor unit 705 is intended to present a broad categoryof microprocessor circuits comprising a wide range of microprocessorfunctions. In general, the programmable thermal sensor 100 is programmedto detect a threshold temperature within the microprocessor 100. If themicroprocessor 700 attains the pre-programmed threshold temperature, theprogrammable thermal sensor 100 generates an interrupt. As describedabove, the programmable thermal sensor 100 detects the pre-programmedthreshold temperature based on the temperature of the integrated circuitat the programmable thermal sensor 100. The temperature across amicroprocessor die can vary as much as 8° F. In a preferred embodimentof the present invention, the programmable thermal sensor 100 is locatedin the middle of the die of microprocessor 700 so as to provide the bestthermal sensing. However, placement of the programmable thermal sensorin the middle of the die increases noise in the microprocessor. In analternative embodiment, several thermal sensors are placed across themicroprocessor die. In this configuration, each thermal sensor providesan interrupt when attaining the threshold temperature, and an averagetemperature is calculated based on the several thermal sensors.

In addition to the programmable thermal sensor 100 and processor unit705, a microprocessor 700 contains an internal register 735, a read onlymemory (ROM) 730, and a phase lock loop (PLL) circuit 720. External tothe microprocessor 700 is an external clock 710. The external clock 710provides a clock signal to the PLL circuit 720. The PLL circuit 720permits fine tuning and variable frequency adjustment of the input clocksignal. Specifically, the PLL circuit 720 receives a value, andincreases or decreases the frequency based on the value received. ThePLL circuit 720 is intended to represent a broad category of frequencyadjustment circuits, which are well known in the art and will not bedescribed further. The output of the PLL circuit 720 is themicroprocessor system clock, and is input to the processor unit 705.

The programmable thermal sensor 100 is coupled to the ROM 730 andinternal register 735. The ROM 730 contains a microprogram consisting ofa plurality of microcode instructions. The operation of the microprogramwithin the microprocessor 700 is described more fully below. In general,the microprogram 740 writes values representing the thresholdtemperature in the internal register 735. The internal register 735stores the threshold temperature values and is coupled to theprogrammable V_(be) circuit 110. For example, in a preferred embodimentof the present invention, the Vp1, Vp2 and Vp3 voltage values stored inthe internal register 735 are used to program the programmable V_(be)circuit 110 in the manner as described above. However, the presentinvention is not limited to three input voltage values in that anynumber of values may be stored in the internal register 735 to programany number of threshold temperatures. When the microprocessor 700attains the threshold temperature, the programmable threshold sensorgenerates a comparator signal via sense amplifier 160 as describedabove. The comparison signal is labeled as “interrupt” on FIG. 7. Theinterrupt is input to the ROM 730 and the processor unit 705.

In response to the interrupt, the microprogram 740 generates new valuesrepresenting a new threshold temperature. The microprogram writes thenew values to the internal register 735. For example, if theprogrammable thermal sensor generates an interrupt based on a thresholdtemperature of 100° F., then the microprogram may write values to theinternal register 735 to represent a threshold temperature of 110 F. Inthe first embodiment, the processor unit 705 receives the interruptsignal as a standard hardware interrupt input. In response to theinterrupt, the processor unit 705 generates a clock control value forthe PLL circuit 720. The clock signal value reduces the microprocessorsystem clock frequency.

If the interrupt is again generated in response to the microprocessor700 attaining the new threshold temperature value, the microprogram 740writes a new temperature threshold value to the internal register 735,and the processor unit 705 further reduces the microprocessor systemclock frequency. In addition, the processor unit 705 may set a standardtimer circuit such that if a pre-determined amount of time elapses, thenthe processor unit 705 increases the clock frequency. Increasing theclock frequency permits the processor unit 705 to increase performancewhen the temperature of the microprocessor has decreased. In addition,to detect further decreases in the microprocessor temperature, themicroprogram 740 may lower the threshold temperature and the processorunit may further increase the clock frequency. Therefore, theprogrammable thermal sensor of the present invention is utilized tocontrol the temperature by increasing and decreasing the microprocessorclock frequency.

Referring to FIG. 8, a flow diagram for a method of controlling theprogrammable thermal sensor configured in accordance with the presentinvention is illustrated. The method illustrated in the flow chart ofFIG. 8 may be a microprogram such as microprogram 740 stored in ROM 730.Upon initialization of the microprocessor, a first threshold temperatureis programmed into the programmable thermal sensor as shown in step 800.Although the present invention is described in conjunction with amicroprocessor integrated circuit, one skilled in the art willappreciate that the thermal sensor of the present invention may beincorporated into any integrated circuit. The temperature of theintegrated circuit is sensed as shown in step 810. The sensing of theintegrated circuit may be performed by the programmable thermal sensor110 of the present invention. The integrated circuit sensor determineswhether the temperature of the integrated circuit equals the firstthreshold temperature. If the integrated circuit temperature is equal toor greater than the threshold temperature, then the thresholdtemperature is compared to a critical temperature as shown in step 830.

The critical temperature is defined as the maximum temperature that theintegrated circuit may attain before the integrated circuit isphysically damaged. If the threshold temperature is equal to thecritical temperature, then the integrated circuit is shut down as shownin step 860. Alternatively, if the threshold temperature is less thanthe critical temperature, then steps are taken to reduce the temperaturein the integrated circuit as shown in step 840. For example, in amicroprocessor integrated circuit, the microprocessor system clockfrequency is reduced. In addition to reducing the system clockfrequency, a message to a system user reporting the temperature of theintegrated circuit is generated. By informing the user with thetemperature information, the user may take steps external to theintegrated circuit to facilitate cooling. Next, a new thresholdtemperature is programmed in the thermal sensor as shown in step 850.The process continues wherein the thermal sensor senses the integratedcircuit temperature to detect if the integrated circuit temperaturereaches the new threshold temperature, and based on the thresholdtemperature set, either shuts down the power to the integrated circuitor executes steps to reduce the temperature.

Referring to FIG. 9, a block diagram of a programmable thermal sensorsystem configured in accordance with a second embodiment of the presentinvention is illustrated. A microprocessor 900 comprises, in part, aprogrammable thermal sensor 110 and a processor unit 905. Theprogrammable thermal sensor 110 is configured as described above. Theprogrammable thermal sensor 110 is connected to a ROM 910 and aninternal register 920. The programmable thermal sensor 110 is alsocoupled to external sensor logic 940. The external sensor logic 940 iscoupled to a counter 950 and an active cooling device 955. An externalclock 945 is input to a counter 950, and the output of the counter 950is input to a clock circuit 930. The clock circuit 930 buffers the inputclock frequency to generate the microprocessor clock for the processorunit 905. In operation, a microprogram 915, stored in ROM 910, sets theinternal register 920 to an initial threshold temperature value. If thetemperature of the microprocessor 900 rises to the thresholdtemperature, an interrupt signal is generated to the external sensorlogic 940.

Upon receipt of the interrupt to the external sensor logic 940, theexternal sensor logic 940 programs a value to the counter 950, andactivates the active cooling device 955. The active cooling device 955may comprise a fan or other heat dissipating device. To activate theactive cooling device 955, the external sensor logic 940 generates asignal to turn on the active cooling device 955 by any number of wellknown methods. The counter 950 is configured as a frequency divider suchthat a clock frequency, from the external clock 945, is input. Thecounter 950 generates a new clock frequency based on the counter value.The programming of a counter, such as counter 950, for use as afrequency divider is well known in the art and will not be describedfurther. As one skilled in the art will recognize, the amount in whichthe clock frequency may be reduced is a function of the counterselected. The slower clock frequency is input to the clock circuit 930.The clock circuit 930 may perform a variety of functions such asbuffering, clock distribution, and phase tuning. The system clockcomprises a reduced frequency to facilitate the cooling of the device.In addition to triggering the external sensor logic 940, theprogrammable thermal sensor also interrupts the microprogram 915. Uponreceiving the interrupt, the microprogram 915 programs the internalregister 920 to sense a new threshold temperature. If the microprocessor900 heats up to the new threshold temperature, the external sensor logic940 is again triggered, and the system clock frequency is furtherreduced. The configuration illustrated in FIG. 9 provides closed loopcontrol of the microprocessor system clock frequency, therebyautomatically reducing the temperature when overheating occurs.

Referring to FIG. 10, a block diagram of a fail safe thermal sensorconfigured in accordance with the present invention is illustrated. Afail safe thermal sensor 1010 is incorporated into a microprocessor1000. Although the fail safe thermal sensor 1010 is incorporated intothe microprocessor 1000, one skilled in the art will appreciate the failsafe thermal sensor may be incorporated into any integrated circuit. Thefail safe thermal sensor 1010 contains a V_(be) circuit 1012, a bandgapvoltage reference circuit 120, a current source 140, and a senseamplifier 160. The bandgap voltage reference circuit 120, the currentsource 140 and the sense amplifier 160 operate in accordance with therespective circuits described above. The V_(be) reference circuit 1012is equivalent to the programmable V_(be) circuit 110, except that theresistive value ratio is fixed. In the V_(be) circuit 1012, the outputV_(be) voltage is fixed based on resistive values R5, R6, R7, R8 and R9.In a preferred embodiment of the present invention, the resistive valuesR5, R6, R7, R8 and R9 are fixed to the critical temperature.Consequently, the fail safe thermal circuit 1010 generates an interruptwhen the temperature of the microprocessor 1000 attains thepre-programmed fixed critical temperature.

The output of the fail safe thermal sensor 1010 is connected to stopclock logic 1015. The stop clock logic 1015 is coupled to themicroprocessor clock circuit 1020. Upon receipt of the interrupt of thefail safe thermal sensor 1010, the stop clock logic 1015 halts operationof the microprocessor 1000 by inhibiting the microprocessor clock. Inaddition, the stop clock logic 1015 ensures that the microprocessor 1000finishes a system cycle completely. The stop clock logic 1015 thereforeprotects loss of data when an interrupt is generated during amicroprocessor clock cycle. A microprocessor clock circuit 1012 maycomprise a simple clock oscillator or a more complex and controllableclock generator. The fail safe thermal sensor 1010 prohibits themicroprocessor 1000 from attaining a critical temperature, therebyprotecting the device without software control.

Referring to FIG. 11, a computer system incorporating a microprocessorcomprising thermal sensing configured in accordance with the presentinvention is illustrated. A computer system 1100 contains a centralprocessing unit (CPU) 1105 incorporating the programmable thermal sensor100 and the fail safe thermal sensor 1010. In a preferred embodiment,the CPU comprises a compatible Intel microprocessor architecture,manufactured by Intel Corporation, the assignee of the presentinvention. The computer system 1100 also contains memory 1110 and an I/Ointerface 1120. The I/O interface 1120 is coupled to an output display1130 and input devices 1140 and 1145. In addition, I/O interface 1120 iscoupled to a mass memory device 1160. The CPU 1105, memory 1110, I/Ointerface 1120, output device 1130, and input devices 1140 and 1145 arethose components typically found in a computer system, and, in fact, thecomputer system 1100 is intended to represent a broad category of dataprocessing devices. The memory 1110 stores software for operation of thecomputer system 1100. Specifically, memory 1110 stores, in part, anoperating system and an interrupt handler routine for operation inconjunction with the thermal sensor.

Upon generation of an interrupt in the programmable thermal sensor 100or the fail safe thermal sensor 1010, the interrupt handler routine 1165is executed. The calling of an interrupt handler routine upon generationof a hardware interrupt in a microprocessor is well-known in the art andwill not be described further. In general, the interrupt handler routine1165 generates a message to the output display 1130. The message informsthe user of the computer system 1100 that the microprocessor 1105 hasattained the threshold temperature. In response, a user may alterexternal environmental conditions to facilitate cooling of the CPU 1105.As described above, the CPU 1105 sets a new threshold temperature forthe programmable thermal sensor. If the CPU 1105 temperature rises tothe new threshold temperature, another interrupt is generated. Again,the interrupt handler routine 1165 is called to generate a message tothe user on output display 1130. If the temperature reaches a criticaltemperature for which the fail safe thermal sensor is programmed, thenthe fail safe thermal sensor generates an interrupt to shut down the CPU1105.

Although the present invention has been described in terms of apreferred embodiment, it will be appreciated that various modificationsand alterations might be made by those skilled in the art withoutdeparting from the spirit and scope of the invention. The inventionshould therefore be measured in terms of the claims which follow.

1. An integrated circuit comprising: a fail safe sensor; a programmablethermal sensor; halt logic to halt operation of the integrated circuitin response to the fail safe sensor indicating that a pre-programmedfixed threshold temperature has been exceeded; and clock adjustmentlogic to control temperature of the integrated circuit in response tothe programmable thermal sensor indicating that a programmable thresholdtemperature has been exceeded by decreasing a clock frequency of theintegrated circuit.
 2. The integrated circuit of claim 1 wherein thehalt logic is to inhibit operation of the integrated circuit by stoppinga clock for the integrated circuit.
 3. The integrated circuit of claim 1wherein the halt logic protects the integrated circuit without softwarecontrol.
 4. The integrated circuit of claim 1 comprising: a plurality ofprogrammable thermal sensors placed across the integrated circuit; anaveraging mechanism in communication with the plurality of programmablethermal sensors to calculate an average temperature from the pluralityof programmable thermal sensors.
 5. The integrated circuit of claim 1wherein the clock adjustment logic is further to control the temperatureof the integrated circuit by increasing the clock frequency of theintegrated circuit.
 6. The integrated circuit of claim 1 wherein theclock adjustment logic is further to execute instructions to provideclosed loop control of the integrated circuit clock frequency, therebyautomatically reducing the temperature when overheating occurs.
 7. Theintegrated circuit of claim 1 further comprising threshold adjustmentlogic to increase the programmable threshold temperature value to a newthreshold temperature value in response to the programmable thermalsensor indicating that the threshold temperature value has beenexceeded.
 8. The integrated circuit of claim 7 wherein the thresholdadjustment logic is further to lower the new threshold temperature todetect decreases in temperature.
 9. The integrated circuit of claim 1further comprising an interrupt handler to display information regardinga sensed temperature to a user of the integrated circuit upon generationof an interrupt in the fail safe sensor or the programmable thermalsensor.
 10. A method comprising: sensing a temperature of an integratedcircuit using a first sensor provided on the integrated circuit; sensingthe temperature of the integrated circuit using a second sensor providedon the integrated circuit; halting operation of the integrated circuitin response to sensing with the first sensor that a pre-programmed fixedthreshold temperature has being exceeded; and controlling a clockfrequency of the integrated circuit by decreasing the clock frequency inresponse to sensing with the second sensor that a programmable thresholdtemperature has been exceeded.
 11. The method of claim 10 whereinhalting operation comprises inhibiting operation of the integratedcircuit by stopping a clock for the integrated circuit.
 12. The methodof claim 10 wherein halting operation comprises halting operation of theintegrated circuit without software control.
 13. The method of claim 10wherein controlling further comprises increasing the clock frequency ofthe integrated circuit in response to the sensed temperature.
 14. Themethod of claim 10 wherein controlling further comprises executinginstructions to provide closed loop control of the integrated circuitclock frequency in response to the sensed temperature.
 15. The method ofclaim 10 further comprising displaying information regarding a sensedtemperature to a user of the integrated circuit in response togeneration of an interrupt in the first sensor or the second sensor. 16.The integrated circuit of claim 1, wherein the integrated circuit is amicroprocessor.